namespace IMPlant.Core.Web.Control
{
    using System;
    using System.ComponentModel;
    using System.Drawing;

    [ToolboxItem(false), TypeConverter(typeof(ExpandableObjectConverter))]
    public class MouseOver
    {
        private bool _cellChangeColor;
        private Color _cellOverColor;
        private bool _changeColor;
        private Color _overColor;

        public override string ToString()
        {
            return "";
        }

        [Description("鼠标移动时，是否Cell颜色跟随鼠标变动显示"), Category("扩展属性"), NotifyParentProperty(true), DefaultValue(false)]
        public bool CellChangeColor
        {
            get
            {
                return this._cellChangeColor;
            }
            set
            {
                this._cellChangeColor = value;
            }
        }

        [NotifyParentProperty(true), Description("鼠标移动时，Cell的颜色"), Category("扩展属性")]
        public Color CellOverColor
        {
            get
            {
                if (!string.IsNullOrEmpty(this._cellOverColor.ToString()))
                {
                    return this._cellOverColor;
                }
                return Color.FromName("#99ccff");
            }
            set
            {
                this._cellOverColor = value;
            }
        }

        [NotifyParentProperty(true), DefaultValue(false), Description("鼠标移动时，是否行颜色跟随鼠标变动显示"), Category("扩展属性")]
        public bool ChangeColor
        {
            get
            {
                return this._changeColor;
            }
            set
            {
                this._changeColor = value;
            }
        }

        [Category("扩展属性"), NotifyParentProperty(true), Description("鼠标移动时，行的颜色")]
        public Color OverColor
        {
            get
            {
                if (!string.IsNullOrEmpty(this._overColor.ToString()))
                {
                    return this._overColor;
                }
                return Color.FromName("#B9D1F3");
            }
            set
            {
                this._overColor = value;
            }
        }
    }
}

